home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gs24src.zip / WATC.MAK < prev    next >
Text File  |  1992-03-25  |  7KB  |  268 lines

  1. #    Copyright (C) 1991, 1992 Aladdin Enterprises.  All rights reserved.
  2. #    Distributed by Free Software Foundation, Inc.
  3. #
  4. # This file is part of Ghostscript.
  5. #
  6. # Ghostscript is distributed in the hope that it will be useful, but
  7. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. # to anyone for the consequences of using it or for whether it serves any
  9. # particular purpose or works at all, unless he says so in writing.  Refer
  10. # to the Ghostscript General Public License for full details.
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute
  13. # Ghostscript, but only under the conditions described in the Ghostscript
  14. # General Public License.  A copy of this license is supposed to have been
  15. # given to you along with Ghostscript so you can know your rights and
  16. # responsibilities.  It should be in a file named COPYING.  Among other
  17. # things, the copyright notice and this notice must be preserved on all
  18. # copies.
  19.  
  20. # makefile for Ghostscript, MS-DOS/Watcom C386 platform.
  21.  
  22. # ------------------------------- Options ------------------------------- #
  23.  
  24. ###### This section is the only part of the file you should need to edit.
  25.  
  26. # ------ Generic options ------ #
  27.  
  28. # Define the default directory/ies for the runtime
  29. # initialization and font files.  Separate multiple directories with \;.
  30. # Use / to indicate directories, not a single \.
  31.  
  32. GS_LIB_DEFAULT=c:/gs\;c:/gs/fonts
  33.  
  34. # Define the name of the Ghostscript initialization file.
  35. # (There is no reason to change this.)
  36.  
  37. GS_INIT=gs_init.ps
  38.  
  39. # Choose generic configuration options.
  40.  
  41. # Setting DEBUG=1 includes debugging features (-Z switch) in the code.
  42. # Code runs substantially slower even if no debugging switches are set,
  43. # and also takes about another 25K of memory.
  44.  
  45. DEBUG=0
  46.  
  47. # Setting TDEBUG=1 includes symbol table information for the Watcom debugger.
  48. # No execution time or space penalty, just larger .OBJ and .EXE files
  49. # and slower linking.
  50.  
  51. TDEBUG=0
  52.  
  53. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  54. # so they are visible to the debugger and profiler.
  55. # No execution time or space penalty, just larger .OBJ and .EXE files.
  56.  
  57. NOPRIVATE=0
  58.  
  59. # ------ Platform-specific options ------ #
  60.  
  61. # Define the drive, directory, and compiler name for the Watcom C files.
  62. # COMP is the full compiler path name (normally \watcom\bin\wcc386p).
  63. # LINK is the full linker path name (normally \watcom\bin\wlinkp).
  64. # CLINK is the compile-and-link utility full path name (normally
  65. #   \watcom\binb\wcl386).
  66. # STUB is the full path name for the DOS extender stub (normally
  67. #   \watcom\binb\wstub.exe).
  68. # INCDIR contains the include files (normally \watcom\h).
  69. # LIBDIR contains the library files (normally \watcom\lib386).
  70. # Note that INCDIR and LIBDIR are always followed by a \,
  71. #   so if you want to use the current directory, use an explicit '.'.
  72.  
  73. COMP=c:\watc\bin\wcc386p
  74. LINK=c:\watc\bin\wlinkp
  75. CLINK=c:\watc\binb\wcl386
  76. STUB=c:\watc\binb\wstub.exe
  77. INCDIR=c:\watc\h
  78. LIBDIR=c:\watc\lib386
  79.  
  80. # Choose platform-specific options.
  81.  
  82. # Define the processor (CPU) type.  Options are 386 or 486.
  83. # Currently the only difference is that 486 always uses in-line
  84. # floating point.
  85.  
  86. CPU_TYPE=386
  87.  
  88. # Define the math coprocessor (FPU) type.  Options are 0, 287, or 387.
  89. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  90. # CPU includes the equivalent of an 80387 on-chip.
  91. # A non-zero option means that the executable will only run if a FPU
  92. # of that type (or higher) is available: this is NOT currently checked
  93. # at runtime.
  94. #   Code is significantly faster.
  95.  
  96. FPU_TYPE=0
  97.  
  98. # ---------------------------- End of options ---------------------------- #
  99.  
  100. # We want Unix-compatible behavior.  This is part of it.
  101.  
  102. .NOCHECK
  103.  
  104. # Define additional extensions to keep `make' happy
  105.  
  106. .EXTENSIONS: .be .z
  107.  
  108. # Define the platform name.
  109.  
  110. PLATFORM=watc_
  111.  
  112. # Define the name of the makefile -- used in dependencies.
  113.  
  114. MAKEFILE=watc.mak
  115.  
  116. # Define the ANSI-to-K&R dependency.  Watcom C accepts ANSI syntax.
  117.  
  118. AK=
  119.  
  120. # Define the extensions for the object and executable files.
  121.  
  122. OBJ=obj
  123. XE=.exe
  124.  
  125. # Define the need for uniq.
  126.  
  127. UNIQ=uniq$(XE)
  128.  
  129. # Define the current directory prefix, shell quote string, and shell name.
  130.  
  131. EXPP=dos4gw
  132. QQ="
  133. SH=
  134. SHP=
  135.  
  136. # Define the generic compilation flags.
  137.  
  138. PLATOPT=
  139.  
  140. !ifeq CPU_TYPE 486
  141. FPFLAGS=-fpi87
  142. !else
  143. !ifeq FPU_TYPE 387
  144. FPFLAGS=-fpi87
  145. !else
  146. !ifeq FPU_TYPE 287
  147. FPFLAGS=-fpi287
  148. !else
  149. FPFLAGS=
  150. !endif
  151. !endif
  152. !endif
  153.  
  154. INTASM=
  155. PCFBASM=
  156.  
  157. # Define the generic compilation rules.
  158.  
  159. .asm.obj:
  160.     $(ASM) $(ASMFLAGS) $<;
  161.  
  162. # Make sure we get the right default target for make.
  163.  
  164. dosdefault: gs$(XE)
  165.     %null
  166.  
  167. # -------------------------- Auxiliary programs --------------------------- #
  168.  
  169. genarch$(XE): genarch.c
  170.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) genarch.c
  171.  
  172. # We need a substitute for the Unix uniq utility.
  173. # It only has to handle stdin and stdout, no options.
  174. uniq$(XE): uniq.c
  175.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) uniq.c
  176.  
  177. # Define the compilation flags.
  178.  
  179. !ifneq NOPRIVATE 0
  180. CP=-dNOPRIVATE
  181. !else
  182. CP=
  183. !endif
  184.  
  185. !ifneq DEBUG 0
  186. CD=-dDEBUG
  187. !else
  188. CD=
  189. !endif
  190.  
  191. !ifneq TDEBUG 0
  192. CT=-d2
  193. LCT=DEBUG ALL
  194. !else
  195. CT=-d1
  196. LCT=DEBUG LINES
  197. !endif
  198.  
  199. GENOPT=$(CP) $(CD) $(CT)
  200.  
  201. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS)
  202. CC=$(COMP) -oi -i=$(INCDIR) $(CCFLAGS)
  203. CCL=$(CLINK) -p -oi -i=$(INCDIR) -l=dos4g
  204. CCC=$(CC)
  205. CC0=$(CC)
  206. CCINT=$(CC)
  207.  
  208. .c.obj:
  209.     $(CCC) $<
  210.  
  211. # ------ Devices and features ------ #
  212.  
  213. # Choose the language feature(s) to include.  See gs.mak for details.
  214. # Since we have a large address space, we include the optional features.
  215.  
  216. FEATURE_DEVS=filter.dev dps.dev level2.dev
  217.  
  218. # Choose the device(s) to include.  See devs.mak for details.
  219.  
  220. DEVICE_DEVS=vga.dev ega.dev epson.dev bj10e.dev deskjet.dev laserjet.dev paintjet.dev
  221. !include gs.mak
  222. !include devs.mak
  223.  
  224. # -------------------------------- Library -------------------------------- #
  225.  
  226. # The Watcom C platform
  227.  
  228. watc__=gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ)
  229. watc_.dev: $(watc__)
  230.     $(SHP)gssetmod watc_ $(watc__)
  231.  
  232. gp_iwatc.$(OBJ): gp_iwatc.c $(string__h) $(gx_h) $(gp_h)
  233.  
  234. gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h)
  235.  
  236. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  237.  
  238. # ----------------------------- Main program ------------------------------ #
  239.  
  240. # A rule to do a quick and dirty compilation attempt when first installing
  241. # Ghostscript.  Many of the compilations will fail: follow this with 'make'.
  242.  
  243. begin:
  244.     erase ccf.tr
  245.     erase arch.h
  246.     erase genarch.exe
  247.     make arch.h
  248.     - $(CCC) *.c
  249.     erase gp_*.obj
  250.     erase gdevepsn.obj
  251.  
  252. # Tracing package (dummy)
  253.  
  254. utrace.obj: utrace.c
  255.  
  256. LIBDOS=$(LIB) gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ) obj.tr lib.tr
  257.  
  258. # Interpreter main program
  259.  
  260. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) utrace.$(OBJ) $(LIBDOS)
  261.  
  262. gs.exe: $(GS_ALL)
  263.     echo OPTION STUB=$(STUB) >_temp_.tr
  264.     echo LIBRARY $(LIBDIR)\math387r >>_temp_.tr
  265.     echo LIBRARY $(LIBDIR)\DOS\clib3r >>_temp_.tr
  266.     $(LINK) $(LCT) @gsw.tr @objw.tr @_temp_.tr
  267.     erase _temp_.tr
  268.